{% extends 'PHPDishWebBundle:Common:notification_layout.html.twig' %}

{% block title %} 我的提醒 {% endblock %}

{% block notification_content %}
    <div class="panel panel-u">
        <div class="panel-heading">全部提醒</div>
        <ul class="list-group notification-list">
            {% import 'PHPDishWebBundle:Macros:notifications.html.twig' as renderer %}
            {% for notification in notifications %}
                <li class="list-group-item">
                    <div class="media notification">
                        <div class="media-left">
                            <a href="{{ path('user_view', {username: notification.fromUser.username}) }}">
                                <img class="media-object avatar" src="{{ asset(notification.fromUser.avatar)|imagine_filter('middle_square') }}">
                            </a>
                        </div>
                        {{ renderer.render_notification(notification) }}
                    </div>
                </li>
            {% else %}
                <li class="list-group-item empty-data">
                    <i class="if i-bell"></i> 没有提醒
                </li>
            {% endfor %}
        </ul>
        {% if notifications.haveToPaginate %}
            <footer class="panel-footer">
                {{ pagerfanta(notifications, 'twitter_bootstrap3') }}
            </footer>
        {% endif %}
    </div>
{% endblock %}